
import axios from 'axios'
// 请求拦截
axios.interceptors.request.use(function (config) {
  config.headers.Authorization = window.sessionStorage.getItem("token")
  return config
});
axios.interceptors.response.use(function (response) {
  console.log(response);   
  if(response.data.meta.status==200)return response;
}, function (error) {
  return Promise.reject(error);
});
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
export const login_api = (params) => {
  return axios.post('login', params)
}